<?php
/**
 * rss.phtml
 *
 * @category    Madoqua
 * @package     Module
 * @subpackage  Admin
 */
?>
<?php if(!$this->rss) : ?>
<h2>News</h2>
<p>
    No news to display at this time.
</p>
<?php else : ?>
<?php if(!Madoqua_Application::inDevelopment()): ?>
<h2><?php echo $this->rss->title; ?></h2>
<ul class="news">
    <?php foreach($this->rss as $item) : ?>
    <li>
        <a href="<?php echo $item->url; ?>">
            <?php echo $item->title; ?>
        </a>
        <?php if (isset($item->pubDate)) : ?>
        <span class="date">
            <?php echo $this->date($item->pubDate); ?>
        </span>
        <?php endif; ?>
        <p>
            <?php echo $item->description; ?>
        </p>
    </li>
    <?php endforeach; ?>
</ul>
<?php else: ?>
<h2><a href="<?php echo $this->rss->getLink(); ?>"><?php echo $this->rss->getTitle(); ?></a></h2>
<ul class="news">
    <?php foreach($this->rss as $item) : ?>
    <li>
        <a href="<?php echo @$item->getLink(); ?>">
            <?php echo @$item->getTitle(); ?>
        </a>

        <span class="date">
            <?php echo $this->date($item->getDateModified()); ?>
        </span>

        <p>
            <?php echo @$item->getContent(); ?>
        </p>
    </li>
    <?php endforeach; ?>
</ul>
<?php endif;?>
<?php endif; ?>